/**
 * 
 */
package qy.jalgotrade.dataseries.resampled;

import java.time.ZonedDateTime;

import qy.jalgotrade.bar.Bar;
import qy.jalgotrade.utils.resamplebase.Grouper;
import qy.jalgotrade.utils.resamplebase.TimeRange;

/**
 * @author c-geo
 *
 */
public interface DSResampler<T> {

	/**
	 * 
	 * @param range
	 * @param value
	 * @param frequency
	 * @return
	 */
	Grouper<T> buildGrouper(TimeRange range, T value, Bar.Frequency frequency);

	/**
	 * 
	 * @throws Exception
	 */
	void pushLast() throws Exception;

	/**
	 * 
	 * 
	 * @param dateTime The current datetime.
	 * @throws Exception
	 */
	void checkNow(ZonedDateTime dateTime) throws Exception;
}
